package com.toe.business.webapi.mapper;

import com.toe.pojo.dto.business.BusinessInfoUpdateDTO;
import com.toe.pojo.entity.business.BusinessInformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.toe.pojo.vo.business.BusinessInfoDetailsVO;
import com.toe.pojo.vo.business.BusinessInfoId;
import com.toe.pojo.vo.business.BusinessInfoShowVO;
import com.toe.pojo.vo.recommend.RecommendBusinessVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
@Repository
public interface BusinessInformationMapper extends BaseMapper<BusinessInformation> {

    /*返回健身房信息,做推荐用*/
    List<RecommendBusinessVO> ListByIds(List<String> ids);

    /*查询出所有商家展示信息*/
    List<BusinessInfoShowVO> findAllBusiness();

    /*根据id查询出商家详细信息*/
    BusinessInfoDetailsVO businessInfoDetails(Long id);
    /*单独返回商家封面作为商家相册*/
    List<String> businessCover(Long id);

    /*返回商家ID给order模块*/
    List<BusinessInfoId> businessIds();

    /*商家修改个人信息*/
    void updateBusinessInfoById(BusinessInfoUpdateDTO businessInfoUpdateDTO);

    /*查询商家营业时间时间*/
    String openingTimeById(Long id);

    // 分页查询平台的商家信息
    List<BusinessInformation> queryBussinessList();

    // 根据id删除入驻商家(逻辑删除)
    int deleteBusinessById(Long id);
}
